﻿using System;
using System.Collections;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Reflection;
using System.ComponentModel;
using System.Globalization;
using NLBS.Web.HttpHandlers;
using NLBS.Data.Business;
using NLBS.Entity;

namespace NLBS.Blog.Services
{
    /// <summary>
    /// Summary description for $codebehindclassname$
    /// </summary>
    public class WidgetSvc : AjaxHandler
    {

        public string getWidget(int widgetId)
        {
            Widget widget = WidgetData.GetWidgetByID(widgetId);
           return Serialize(widget);
        }

        public string updateWidget(int widgetId, string content)
        {
            Widget widget = WidgetData.GetWidgetByID(widgetId);
            widget.Content = content;
            WidgetData.UpdateWidget(widget);
            return string.Empty;
        }
    }
}
